<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">
	
    <div class="main">
 		
        
        
        <!--{php $subcats = subcat($catid,'content');}-->
		<!--{loop $subcats $catid $cat}-->
        
        	<div class="mod">
                <div class="head"><a href="{$CATEGORY[$cat[catid]][url]}">{$cat[catname]}</a></div>
                <div class="body">
                    
                    <style type="text/css">
						.list li{
							border-bottom:1px dashed #CCCCCC; margin:20px 0 0 0;
						}
						.list li p{
							margin:0; padding:0;
						}
					 </style>
                    <ul class="list">
                      {php $chids = subcatid($cat[catid])}
                      {get sql="SELECT contentid,catid,typeid,areaid,title,style,thumb,keywords,description,userid,updatetime,inputtime,url FROM `table_content` WHERE  status=99 and catid in($chids) ORDER BY contentid DESC" rows="20"}
                      {php $keywords = explode(' ',$r[keywords]);}
                        <li>
                            <h4><a target="_blank" href="{url("?module=space&userid=$r[userid]")}">{username($r[userid])}</a>，<a href="{url($r[url])}" target="{$target}">{str_cut($r[title], 300)}</a><span class="date">{date('Y-m-d',$r[updatetime])}</span></h4>
                            <div>
                                {loop $keywords $k $v}
                                <a class="label" class="label" href="{url("?module=content&action=tag&name=$v")}">{$v}</a>
                                {/loop}
                            </div>
                            <div>{$r[description]}<a href="{url($r[url])}">查看原文</a> <a href="#">查看全部评论共(2)条</a></div>
                        </li>
            
                      {/get}
                    </ul>
            
                </div>
            </div>
         
        
        <!--{/loop}-->

    </div>
    
    <div class="aside">
    
    	
        <div class="mod">
        	<div class="head">资讯分类</div>
            <div class="body">
            	<ol>
                    {get sql="select catid,catname,url from table_category where `module` = 'content'" rows="10"}
                    <li><a href="{url($r[url])}" title="{$r[url]}">{$r[catname]} ({php echo category_sub_count($r[catid]);})</a></li>
                    {/get}
                </ol>
            </div>
        </div>
    
    	<div class="mod">
            <div class="head">热门阅读</div>
            <ul class="body">
              <!--{get sql="select title,url,hits from table_content order by hits desc" rows="10"}-->
                <li>({$r[hits]})&nbsp;<a href="{url($r[url])}">{$r[title]}</a></li> 
              <!--{/get}-->
            </ul>
        </div>
    
        <div class="mod">
            <div class="head">热门标签</div>
            <div class="body">
          <!--{get sql="select tag,hits from table_keyword order by listorder desc,hits desc" rows="10"}-->
            <a href="{url("?module=content&action=tag&name=".urlencode($r[tag]))}">{$r[tag]} <small>({$r[hits]})</small></a>
          <!--{/get}-->
          </div>
        </div>
          
    </div>
</div>


{template 'footer.html'}

